/**
 * @projectName base-yl
 * @package com.base.yl.cloudwechat.holder
 * @className com.base.yl.cloudwechat.holder.RequestInfoHolder
 */
package com.answer.wx.gateway.config.filter;


/**
 * RequestInfoHolder
 * @description 请求头信息
 * @author answer_wx
 * @date 2022/8/4 17:37
 * @version 1.0
 */
public class RequestInfoHolder {
    private static ThreadLocal<HttpHeader> requestLocal = new ThreadLocal<>();

    public static void newRequest(HttpHeader httpHeader) {
        requestLocal.set(httpHeader);
    }

    public static String getOpenId() {
       return requestLocal.get().getOpenid();
    }
}